Class vs.Vscp

Class vs.Vscp

java.lang.Object
   |
   +----vs.Vscp

public class Vscp
extends Object

This class contains the mult user shared behavioh API.


Variable Index

o allClients
o allClientsExceptMe
o responderOnly
o vsSockConnected
o vsSockConnecting
o vsSockDisconnecting
o vsSockNotConnected

Method Index

o amIMaster()
o getAvtroomAvatarColor()
o getAvtroomAvatarURL()
o goFromAvtroomToOriginalWorld()
o getSockState()
o sendApplSpecificMsg(Node, String, String)
o sendApplSpecificMsg(SFNode, String, String)
o sendApplSpecificMsgWithDist(Node, String, String, int)
o sendApplSpecificMsgWithDist(SFNode, String, String, int)
o sendKeepConnection(boolean)
o sendSetAttribute(Node, String)
o sendSetAttribute(SFNode, String)
o setAvtroomAvatarColor(String)
o updateObject(Node)
o updateObject(SFNode)

Variables

o responderOnly
  public final static int responderOnly
o allClients
  public final static int allClients
o allClientsExceptMe
  public final static int allClientsExceptMe
o vsSockNotConnected
  public final static int vsSockNotConnected
o vsSockConnecting
  public final static int vsSockConnecting
o vsSockConnected
  public final static int vsSockConnected
o vsSockDisconnecting
  public final static int vsSockDisconnecting

Methods

o amIMaster
  public static boolean amIMaster()
Function:
this function returns a Master status in current world.
Args:
Nothing.
o sendKeepConnection
  public static void sendKeepConnection(boolean connectionState)
Function:
set the vscp connection mode.
Args:
connectionState
true, to keep the connection,false to normal.
o getSockState
  public static int getSockState()
Function:
this function returns the current vscp socket status.
Args:
Nothing.
Return:one of following:
vsSockNotConnected
vsSockConnecting
vsSockConnected
vsSockDisconnecting
o setAvtroomAvatarColor
  public static void setAvtroomAvatarColor(String color)
Function:
This function stores the color value into the Windows95 registry. The color value must be encoded into a string.
Args:
color :(in)
color string.
o getAvtroomAvatarColor
  public static String getAvtroomAvatarColor()
Function:
This function obtains the current color value of the avatar in question.encoded into a string.
Return:
color string.
o getAvtroomAvatarURL
  public static String getAvtroomAvatarURL()
Function:
This function obtains the avatar URL.
Return:
URL string of Avatar file.
o goFromAvtroomToOriginalWorld
  public static void goFromAvtroomToOriginalWorld()
Function:
This function changes the displayed world from avatar room to the original world.
o sendApplSpecificMsg
  public static void sendApplSpecificMsg(Node obj,
                                         String methodName,
                                         String argument)
Function:
this function invokes the specified function with args on all the other clients.
Args:
obj :(in)
Node instance.
methodName : (in)
Remote function method name.
argument : (in)
Arg string.
o sendApplSpecificMsgWithDist
  public static void sendApplSpecificMsgWithDist(Node obj,
                                                 String methodName,
                                                 String argument,
                                                 int distrMethod)
Function:
This function invokes the specified script function with args on clients that are specified by [distmethod] parameter.
Args:
obj :
Node instance.
methodName :
Remote function method name.
args :
Arg string.
distrMethod :
One of:
responderOnly
The packet will be sent to the responder of the target 3d object.
  • If the 3d object is an avator, the packet is delivered to the client.
  • If the 3d object is managed by AO, the packet is delivered to the AO.
  • If the 3d object is not managed by anyone, the packet is delivered to the master of the simple shared behavior.
    allClients
    The packet will be sent to all the that are clients currently connected to the server, including the sender. This option may not work in the future.
    allClientsExceptMe
    The packet will be sent to all the that are clients currently connected to the server, except the sender. This option may not work in the future.
  • o sendSetAttribute
      public static void sendSetAttribute(Node obj,
                                          String data)
    
    o updateObject
      public static void updateObject(Node obj)
    
    Function:
    This functions sends out a packet including the latest position of the specified object.
    Args:
    obj :(in)
    Node instance.
    o sendApplSpecificMsg
      public static void sendApplSpecificMsg(SFNode obj,
                                             String methodName,
                                             String argument)
    
    see sendAppleSpecificMsg()
    o sendApplSpecificMsgWithDist
      public static void sendApplSpecificMsgWithDist(SFNode obj,
                                                     String methodName,
                                                     String argument,
                                                     int distrMethod)
    
    see sendApplSpecificMsgWithDist()
    o sendSetAttribute
      public static void sendSetAttribute(SFNode obj,
                                          String data)
    
    see sendSetAttribute()
    o updateObject
      public static void updateObject(SFNode obj)
    
    see updateObject()